﻿<link rel="stylesheet" href="http://www.12301.cc/css/common/reset_style.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/ui/common/ui_common.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/pft_resource/css/style.css"/>
<iframe name="imgUploadForm" src="" width="0" height="0" style="display:none" frameborder="0"></iframe>
<form id="submitForm" action="call/upload_api.php" method="post" target="imgUploadForm" enctype="multipart/form-data">
    <input id="sidHidInp" value="<?=$_GET["sid"]?>" type="hidden"/>
    <input name="ptype" id="ptypeHidInp" type="hidden" value="<?=$var["p_type"]?>"/>
    <input type="hidden" name="lastid" value="<?=$var["id"]?>"/>
    <input type="hidden" name="applydid" value="<?=$var['apply_did']?>"/>
    <input type="hidden" name="action" value="CreateNewProduct"/>
    <input type="hidden" name="upload_mth" id="upload_mth" value="1"/>
    <input type="hidden" name="venue_old" value="" />
    <input id="imgpathGrpHidInp" value="<?=$imgpathGrp?>" type="hidden"/>
	<div id="mainContainer" class="resource_box">
        <div class="ulbox_top">
			<ul>
				<li class="setwidth_a setfont_a">1.产品信息</li>
				<li class="setwidth_b setml">2.景点信息</li>
				<li class="setwidth_a setml">3.门票信息</li>
			</ul>
		</div>
		<div class="post_box setpadding">
			<ul>
				<li class="list">
                    <span class="post_title setcolor_d">产品名称：</span>
                    <input class="setinput ui-radius ui-shadow" type="text" value="<?=$var["title"]?>" name="mainTitle"/>
                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>
                </li>
				<li class="list"><span class="post_title setcolor_d">关联产品信息：</span><div class="setbox"><input name="resource_id" id="resourceIdHidInp" type="hidden" value="<?=$var['resourceID']?>"/><div id="linkResourceName" class="totaltxt"><?=$var["resource_title"]?></div><a id="btnRep" class="btn_base btn_choosedata" href="javascript:void(0)">从资料库提取</a></div></li>
                <li  class="list setheight">
                    <span class="post_title setcolor_d">景区级别：</span>
                    <input readonly class="cityInp ui-radius ml18" id="jtypeInp" value="<?=$var["jtype"]?>" value="5A" name="jtype" type="text"/>
                </li>
				<li  class="list setheight">
                    <span class="post_title setcolor_d">推荐级别：</span>
                    <input class="cityInp ui-radius ml18 ui-shadow" value="<?=$var["px"]?>" name="px" type="text"/>
                    <p class="tipMsg">值越大，产品在预定列表中排得越靠前，值>=10000,产品进入热门产品列表</p>
                </li>
                <li  class="list setheight">
                    <span class="post_title setcolor_d">终端配置：</span>
                    <input name="terminal_type" value="<?=$var['terminal_type']?>" type="hidden" value="<?=$var['terminal_type']?>"/>
                    <?if($var['terminal_type']==1){?>
                    <span class="ml18">已启用</span>
                    <?}else{?>
                    <span class="selectBox ml18">
                        <em class="selected"><?
                            switch ($var['terminal_type']) {
                            	case '0':
                            	    echo '不启用';
                            		break;

                            	default:
                                    echo '自启用';
                            		break;
                            }
                            ?></em>
                        <i class="iconfont moreIcon" href="###">&#xe673;</i>
                    </span>
                    <!--下拉选择列表-->
                    <div class="ui-page">
                        <ul class="dropBox">
                            <li data-value="0">不启用</li>
                            <li data-value="1">启用</li>
                            <li data-value="2">自启用</li>
                        </ul>
                    </div>
                    <!--下拉选择列表 end-->
                    <?}?>
                </li>
				<li class="set_position set_height">
					<span class="post_title setcolor_d">地址：</span>
					<div class="addressbox">
                        <? $arr = explode("|",$var["area"]);?>
                        <input readonly value="<?=$arr[0]?>" class="cityInp ui-radius" name="d_province" id="provInp" type="text"/>
                        <input readonly value="<?=$arr[1]?>" class="cityInp ui-radius" name="d_city" id="cityInp" type="text"/>
					</div>
					<input readonly id="addressInp" class="setinput input_address ui-radius" value="<?=$var["address"]?>" name="mainAddress" type="text"/>
				</li>
                <li class="list lnglatLine">
                    <span class="post_title setcolor_d">经纬度：</span>
                    <input id="lng_lat_pos_inp" readonly name="end_place_tude" value="<?=$var["lng_lat_pos"]?>" class="lnglatInp setinput ui-radius" type="text"/>
                    <!--
                    <span class="rt">
                        <a class="btn ui-btn ui-radius" target="_blank" href="http://api.map.baidu.com/lbsapi/getpoint/index.html">查询经纬度</a>
                        <span class="tip">请在新打开的窗口中获取经纬度后，复制进来</span>
                    </span>-->
                </li>
				<li class="list">
					<span class="post_title setcolor_d">主题：</span>
					<input id="themeInp" name="topic" value="<?=$var["topic"]?>" class="setinput themeInp ui-radius" readonly type="text"/>
<!--                    <a id="openThemeDialogBtn" class="themeSelectBtn" href="javascript:void(0)"><i class="iconfont">&#xe696;</i></a>-->
				</li>
                <li class="list"><span class="post_title setcolor_d">开放时间：</span><input type="text" id="runtime" readonly value="<?=$var["runtime"]?>" class="setinput ui-radius" name="runtime"/></li>
                <li class="list">
                    <span class="post_title setcolor_d">联系电话：</span>
                    <input id="phone" value="<?=$var["tel"]?>" class="setinput ui-radius ui-shadow" name="mainPhoneNum" type="text"/>
                    <p class="tipMsg">手机或固话（固话格式：区号-电话号码）</p>
                </li>
                <li  class="list setheight">
                    <span class="post_title setcolor_d">延迟验证：</span>
                    <span class="ml18">下单完成</span>
                    <?
                        $delaytime = explode("|",$var["delaytime"]);
                        $delayHours = $delaytime[0] ? $delaytime[0] : '';
                        $delayMines = $delaytime[1] ? $delaytime[1] : '';
                    ?>
                    <select class="time" name="vtimehour">
                        <?
                            for($h=0; $h<=12; $h++){
                                $selected = $h==$delayHours ? 'selected="selected"' : "";
                                echo '<option value="'.$h.'" '.$selected.'>'.$h.'</option>';
                            }
                        ?>
                    </select>
                    <span>时</span>
                    <select class="time" name="vtimeminu">
                        <?
                            for($m=0; $m<=60; $m++){
                                $selected = $m==$delayMines ? 'selected="selected"' : "";
                                echo '<option value="'.$m.'" '.$selected.'>'.$m.'</option>';
                            }
                        ?>
                    </select>
                    <span>分后，方可使用</span>   
                </li>
				<li class="list" style="width:100%; overflow:hidden">
					<span style="float:left; width:95px;" class="post_title setcolor_d">预览图：</span>
					<div id="uploadImgWrap" class="uploadImgWrap">
                        <ul id="uploadImgUl" class="uploadImgUl" data-orignimg="<?=$var["imgpath"]?>"></ul>
                        <input name="callback" value="ImgUploador.complete" type="hidden"/>
                        <input name="dirname" value="resource" type="hidden"/>
                        <input style="width:215px" type="text" name="img_upload_file_input" class="file_name_inp formInp" id="file_name_inp"/>
                        <a id="browerFileBtnWrap" class="upBtn browerFileBtnWrap" href="javascript:void(0)">
                            <i class="iconfont">&#xe692;</i><span class="t">选择图片</span>
                            <input type="file" name="img_upload_file_input" class="upBtn browerFileBtn" id="browerFileBtn"/>
                        </a>
                        <button type="submit" class="upBtn uploadImgBtn" id="uploadImgBtn"><i class="iconfont">&#xe659;</i><span class="t">上传</span></button>
                        <p class="uploadTip">点击上传小于1M的jpg或gif格式图片，建议图片尺寸600px * 600px</p>
					</div>
				</li>
                <li class="list">
                    <span class="post_title setcolor_d">产品介绍：</span>
                    <div class="setbox_base setbox_b">
                        <textarea style="display:none" name="detailInfo" id="detailInfoTextarea" cols="30" rows="10"><?=$var["jdjj"]?></textarea>
                        <div style="overflow:hidden" id="jdjj" class="txtbox"><?=htmlspecialchars_decode($var["bhjq"])?></div>
                        <a id="editDetail" class="btn_base btn_edit" href="javascript:void(0)">编辑</a>
                    </div>
                </li>
				<li class="list">
					<span class="post_title setcolor_d">交通指南：</span>
					<div class="setbox_base">
						<textarea id="jtznTarea"  name="trafficInfo" class="textarea_base ui-radius ui-shadow"><?=$var["jtzn"]?></textarea>
					</div>
				</li>
                <li class="list">
                    <span class="post_title setcolor_d">预定须知：</span>
                    <div class="setbox_base">
                        <textarea id="bhjqTarea" name="buyTips" class="textarea_base ui-radius ui-shadow"><?=$var["jqts"]?></textarea>
                    </div>
                </li>
<!--                <li class="list">-->
<!--                    <span class="post_title setcolor_d">预定须知：</span>-->
<!--                    <div class="setbox_base setbox_c">-->
<!--                        <textarea id="buyTips" name="buyTips" class="textarea_base ui-radius ui-shadow">--><?//=$var["jqts"]?><!--</textarea>-->
<!--                    </div>-->
<!--                </li>-->
                
			</ul>
			<a href="javascript:void(0)" id="submitBtn" class="btn_base btn_submit">提交</a>
		</div>
	</div>
    <div id="editorPopBox" class="editbox ui-pop">
        <div class="edit_a">
            <textarea id="detailInfo" name="" style="height:500px;" title="请输入"><?=htmlspecialchars_decode($var["bhjq"])?></textarea>
        </div>
        <div class="btnbox_a">
            <a href="javascript:void(0)" class="btn_basea btn_cancelc">取消</a>
            <a href="javascript:void(0)" id="btnSaveContent" class="btn_basea btn_surec">确定</a>
        </div>
    </div>
</form>


<? include("tpl/pft_resource/repro.html"); ?>
<script id="formSubmitSuccessDialogTpl" type="text/template">
    <div class="submitSuccessDialogCon">
        <p class="st"><i class="iconfont">&#xe62c;</i><span class="t">添加成功，您可：</span></p>
        <div class="btnGroup">
            <a class="btn goon ui-btn radius" href="pft_resource.html">继续添加</a>
            <a class="btn outto ui-btn radius" href="pft_resource.html">跳转到列表</a>
        </div>
    </div>
</script>
<script type="text/javascript" src="http://wx.12301.cc/public/js/build/common.min.js"></script>
<?php include("tpl/dialog/dialog.html")?>
<script type="text/javascript" src="http://www.12301.cc/ue/ueditor_config_mini.js"></script>
<script type="text/javascript" src="http://www.12301.cc/ue/ueditor.all.min.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/editor.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/imgupload.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/rep/main.js"></script>
<!--<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/rep.js"></script>-->
<!--<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/product_link_resource.js"></script>-->
